package cn.jeeweb.common.mvc.entity;

import cn.jeeweb.common.annotate.UiPropertyField;
import cn.jeeweb.common.constant.DataBaseConstant;
import cn.xjzn.framework_Core.DataType;
import cn.xjzn.framework_Core.StaticControl;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;

import java.util.Date;

/**
 * 数据Entity类
 * @param <ID>
 *            主键类型
 */
public class DataEntity<ID> extends AbstractEntity<ID> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.UUID)
    @UiPropertyField(propertyName = "id",labelText="唯一标识",displayPosition = 0,canDisplay = false,isDisplayAsSearchResult = false,canSearch = false,canBeNull=false,canPrint = false)
    private ID id;
    @TableField(value = "remarks")
    @UiPropertyField(propertyName = "remarks",labelText="备注",displayPosition = 1100)
    protected String remarks; // 备注
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    @UiPropertyField(propertyName = "createBy",labelText="创建者",displayPosition = 1102,canDisplay = false, isDisplayAsSearchResult = false,isReadOnly = true,isSupportModify = false,isSupportNewEdit = false)
    protected String createBy; // 创建者
    @TableField(value = "creater", fill = FieldFill.INSERT)
    @UiPropertyField(propertyName = "creater",labelText="创建者姓名",displayPosition = 1103,canDisplay = false,isReadOnly = true,isSupportModify = false,isSupportNewEdit = false)
    protected String creater; // 创建者
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @UiPropertyField(propertyName = "createDate",labelText="创建日期",displayPosition = 1104,canDisplay = false,isReadOnly = true,isSupportModify = false,isSupportNewEdit = false,dataType = DataType.TIMESTAMPDATATYPE)
    protected Date createDate; // 创建日期
    @TableField(value = "update_by", fill = FieldFill.UPDATE)
    @UiPropertyField(propertyName = "updateBy",labelText="更新者",displayPosition = 1106,canDisplay = false, isDisplayAsSearchResult = false,isReadOnly = true,isSupportModify = false,isSupportNewEdit = false)
    protected String updateBy; // 更新者
    @TableField(value = "updater", fill = FieldFill.UPDATE)
    @UiPropertyField(propertyName = "updater",labelText="更新者姓名",displayPosition = 1107,canDisplay = false,isReadOnly = true,isSupportModify = false,isSupportNewEdit = false)
    protected String updater; // 更新者
    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    @UiPropertyField(propertyName = "updateDate",labelText="更新日期",displayPosition = 1108,canDisplay = false,isReadOnly = true,isSupportModify = false,isSupportNewEdit = false,dataType = DataType.TIMESTAMPDATATYPE)
    protected Date updateDate; // 更新日期
    @TableField(value = "del_flag", fill = FieldFill.INSERT)
    @UiPropertyField(propertyName = "delFlag",labelText="删除标记",displayPosition = 1110,canDisplay = false, isDisplayAsSearchResult = false,staticControl = StaticControl.INTEGERSTATICCONTROL,dictCode = "sf",isReadOnly = true,isSupportModify = false,isSupportNewEdit = false)
    protected String delFlag = "0"; // 删除标记（0：正常；1：删除 ）

    public DataEntity() {
        super();
        this.delFlag = DataBaseConstant.DEL_FLAG_NORMAL;
    }


    @Override
    public ID getId() {
        return id;
    }

    @Override
    public void setId(ID id) {
        this.id = id;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getUpdater() {
        return updater;
    }

    public void setUpdater(String updater) {
        this.updater = updater;
    }

    public String getCreater() {
        return creater;
    }

    public void setCreater(String creater) {
        this.creater = creater;
    }
}
